﻿using Iworld.Backstage.Framework;
using Iworld.Backstage.Framework.AuthorService;
using Iworld.Toolkit.Helper;
using Iworld.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Iworld.Backstage
{
      [View(Page.提现记录)]
    public partial class WithdrawalsRecordsPage : UserControl
    {
        public WithdrawalsRecordsPage()
        {
            InitializeComponent();
        }

        private void DoWith(object sender, RoutedEventArgs e)
        {
            WithdrawalsRecordExport export = XamlHelper.GetDataContext<WithdrawalsRecordExport>(sender);
            ChangeWithdrawalsStatusWindow win = new ChangeWithdrawalsStatusWindow();
            win.Info = export;
            win.Closed += Closed;
            win.Show();
        }

        void Closed(object sender, EventArgs e)
        {
            ChildWindow cw = sender as ChildWindow;
            if (cw.DialogResult == true)
            {
                WithdrawalsRecordsViewModel v = this.DataContext as WithdrawalsRecordsViewModel;
                v.RefreshCommand.Execute(1);
            }
        }
    }
}
